package jlfm.lastfm.apps;

import java.io.InputStream;

import jlfm.lastfm.client.TrackMetadata;
import jlfm.lastfm.client.impl.simple.SimpleLastFmClient;
import jlfm.lastfm.client.impl.simple.StreamHandler;
import jlfm.lastfm.client.impl.stream.StreamHandlingException;

public class EncapsulatingStreamHandler extends AbstractStreamHandler {
	private StreamHandler streamHandler;

	public EncapsulatingStreamHandler(SimpleLastFmClient c,
			StreamHandler streamHandler) {
		super(c);
		this.streamHandler = streamHandler;
	}

	public boolean handleStream(TrackMetadata metadata, InputStream in)
			throws StreamHandlingException {
		return streamHandler.handleStream(metadata, in);
	}

}
